package com.wdc.patterns.factory.before;

public class Client {

    public static void main(String[] args) {
        //创建coffee店对象
        CoffeeStore coffeeStore = new CoffeeStore();
//        CoffeeFactory factory = new AmericanCoffeeFactory();
        CoffeeFactory factory = new LatteCoffeeFactory();

        coffeeStore.setFactory(factory);

        Coffee coffee = coffeeStore.orderCoffee();
        System.out.println(coffee.getName());


    }
}
